package priv.happy.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @Author: HAPPY
 * @Project_name: hibernate
 * @Package_name: priv.happy.pojo
 * @Date: 2021/10/11 8:32
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "yadea")
public class Yadea extends Transport{
    // @Id
    // @GeneratedValue(strategy = GenerationType.IDENTITY)
    // 子类拥有自己的主键会报错 org.hibernate.mapping.UnionSubclass cannot be cast to org.hibernate.mapping.RootClass
    // private Integer yid;

    private String source;
}
